package abq2.jic.jic.plugin.operate.fastShowAI;

import kd.bos.bill.AbstractBillPlugIn;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.servicehelper.DispatchServiceHelper;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * 单据界面插件
 */
public class AIShowResume extends AbstractBillPlugIn implements Plugin {
    @Override
    public void registerListener(EventObject e) {
        super.registerListener(e);
        this.addClickListeners("abq2_show_ai");
    }

    @Override
    public void itemClick(ItemClickEvent evt) {
        super.itemClick(evt);
        String itemKey = evt.getItemKey();
        if (itemKey.equals("abq2_show_ai")){
            String pageId = this.getView().getMainView().getPageId();
            //GPT任务的id编码
            Object pkValue = Long.parseLong("1955362095558047744");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","selectProcessInSideBar",pkValue,pageId,"此技能用于智能生成简历");
        }
    }
}